package com.example.langchain4j10chatredis.controller;

import com.example.langchain4j10chatredis.service.ChatPersistenceAssistant;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wwl
 * 日期  2025/9/26 17:14
 * 版本 1.0
 * 描述 :
 */
@Slf4j
@RestController
public class RedisController {
    @Resource
    private ChatPersistenceAssistant chatPersistenceAssistant;
    @GetMapping(value = "/redis/test")
    public String test(@RequestParam(value = "message", defaultValue = "Hello") String message) {
        return chatPersistenceAssistant.chat(1L, message);
    }
}
